﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using Entity;
using System.IO;

namespace Template
{
    public class AnalyTemplate
    {
        public T Deserialize<T>(String filePath)
        {
            XmlSerializer xs = new XmlSerializer(typeof(T));
            Stream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
            T p = (T)xs.Deserialize(stream);
            return p;
        }

    }
}
